<?php /*
# ------------------------------------------------------------------------
# JD Base Theme
# ------------------------------------------------------------------------
# Copyright (C) 2004-2010 JoomlArt.com. All Rights Reserved.
# @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
# Author: JoomlArt.com
# Websites: http://www.joomlart.com - http://www.joomlancers.com.
# ------------------------------------------------------------------------
*/?>
<div class="block-class-suffix-handle form-item">
<table id="block-class-suffix-table" width="100%">
	<thead>
		<th><?php echo t('Block') ?></th>
		<th><?php echo t('Suffix') ?></th>
		<th>&nbsp;</th>
	</thead>
	<?php 
	if(count($blocks)){
		foreach ($blocks as $region => $items){
			foreach ($items as $has)
			if($has['suffix']){
			?>
			
			<tr id="block-<?php echo $has['bid'] ?>">
				<td class="block-name"><?php echo $has['info'] ?></td>
				<td>
					<?php echo $has['suffix'] ?>
				</td>
				<td>
					<span class="ja-delete" onclick="t3_sblock_delete('<?php echo $has['bid']; ?>')">Delete</span>
				</td>
			</tr>
			<input type="hidden" name="block[<?php echo $has['bid'] ?>]" value="<?php echo $has['suffix'] ?>" />
			<?php
		}}
	}
	?>
</table>

<table width="100%">
	<tr>
		<td>Blocks</td>
		<td colspan="2">
			<select name="block_item" id="block_item">
			<?php
				foreach ($blocks as $region => $items){
					echo '<optgroup label="'.$region.'">';
					foreach ($items as $item){
						?>
						<option value="<?php echo $item['bid'] ?>" <?php if($item['suffix']) echo 'disabled="disabled"';?>><?php echo $item['info'] ?></option>
						<?php
					}
					echo '</optgroup>';
				}
			?>
			</select>
		
			<span><?php echo t('suffix') ?>:</span><input type="text" id="block_suffix" name="block_suffix" value="" />
			<input type="button" value="<?php echo t('Add') ?>" class="form-submit" name="block_add_button" onclick="t3_sblock_add()" />
		</td>
	</tr>
</table>
</div>